package com.lt.basic.project.admin.controller.sys;


import com.lt.basic.project.admin.aop.Log;
import com.lt.basic.project.application.service.admin.sys.ISysCacheService;
import com.lt.basic.project.common.core.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 系统缓存管理
 * @author LT
 */
@RestController
@RequestMapping("admin/sys/cache")
@Api(tags = "系统缓存管理")
public class SysCacheController {

    @Resource
    ISysCacheService iSysCacheService;

    /**
     * 清除系统缓存
     */
    @Log(title = "清除系统缓存")
    @PostMapping("/clear")
    @ApiOperation(value = "清除系统缓存")
    public AjaxResult<Object> clear() {
        iSysCacheService.clear();
        return AjaxResult.success();
    }


}
